import Axios from "./axios";
import qs from "qs"; //引入 node中自带的qs模块（数据格式转换）
import fr from "element-ui/src/locale/lang/fr"; // 导入配置好的axios文件
// 封装axios请求函数，并用export导出

// 管理员登录
export function login(username, password) {
  return Axios({
    url: "/loginAdmin",
    method: "post",
    headers: {
      "Content-Type": "application/text; charset=utf-8" //设置请求头请求格式form
    },
    params: {
      username: username,
      password: password
    }
  });
}

export function button1(args) {
  return Axios({
    url: "/admin/ans/insert",
    method: "post",
    // headers: {
    //   "Content-Type": "application/text; charset=utf-8" //设置请求头请求格式form
    // },
    data: qs.stringify(args)
  });
}
